/**
 *    Copyright (c) [2022] [中和农信]
 *    rabbit-mq-plus is licensed under Mulan PSL v2.
 *    You can use this software according to the terms and conditions of the Mulan PSL v2.
 *    You may obtain a copy of Mulan PSL v2 at:
 *             http://license.coscl.org.cn/MulanPSL2
 *    THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 *    See the Mulan PSL v2 for more details.
 *
 */
package com.cfpamf.athean.rabbit.mq.plus.validation;

import java.util.Date;

import com.cfpamf.athena.utils.Assert;

/**
 * 类RabbitMqRetryValidation.java的实现描述：
 *
 * @author Andy（陈洪桥）2022年11月25 17:29
 */
public class RabbitMqRetryValidation {

    /**
     * RabbitMqRetryInfo构建校验
     * 
     * @param messageId
     * @param retryDurationByMinute
     * @param currentRetryNumber
     * @param messageTime
     * @param nextRetryTime
     * @param firstMessageTime
     * @param lastDelayRetry
     * @param body
     */
    public static void newRabbitMqRetryInfoBuilderValidation(String messageId, int retryDurationByMinute,
        int currentRetryNumber, Date messageTime, Date nextRetryTime, Date firstMessageTime, boolean lastDelayRetry,
        String body) {
        Assert.notEmpty(messageId, "messageId不能为空");
        Assert.notEmpty(retryDurationByMinute, "retryDurationByMinute不能为空");
        Assert.notEmpty(currentRetryNumber, "currentRetryNumber不能为空");
        Assert.notEmpty(messageTime, "messageTime不能为空");
        Assert.notEmpty(nextRetryTime, "nextRetryTime不能为空");
        Assert.notEmpty(firstMessageTime, "firstMessageTime不能为空");
        Assert.notEmpty(lastDelayRetry, "lastDelayRetry不能为空");
        Assert.notEmpty(body, "body不能为空");
    }

}
